/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercicio.lista1;

/**
 *
 * @author Manoel Afonso
 */
public class Questao1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int ton = 20000;
        int meses = 0;
        while (ton > 0) {
            ton += ton * 0.04;
            ton -= 1000;
            meses++;
        }
        System.out.println("Meses: " + meses);
        System.out.println("Fração: " + Math.abs(ton));
    }
}
